﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Defaults.cshtml";
}

<div ng-app="app" ng-controller="DemoCtrl">                     
   
     <div class="row-fluid"><div class="span6">
         <div id="DataTables_Table_0_length" class="dataTables_length">
                <a class="btn btn-info" ng-click="appDialog(false,null)">
										<i class="glyphicon glyphicon-plus icon-white"></i>  
										Thêm mới                                           
	            </a>
         </div>
         <!-- groupusers -->
                            </div>
         <div class="span6">
            
             <div class="control-group">
                                  <label class="control-label" for="selectError">Nhóm</label>
                                  <div class="controls">
                                        <select  id="type_id" ng-model="item.id" ng-change="selectCombobox(item.id)"   >
                                            <option ng-repeat="item in groupusers" value="{{item.id}}">{{item.group_name}}</option>
                                        </select>
                                  </div>
                          </div>
         </div>

     </div>

     <table class="table table-striped table-bordered bootstrap-datatable datatable">
            <tr>
                <th>Diễn giải</th>
                <th>Thêm</th>
                <th>Sửa</th>
                <th>Xóa</th>
                <th>Hiện thị</th>
            </tr>
            <tr ng-repeat="task in tasks | orderBy : 'tENBAN' | filter:search">
                <td> {{task.title}}</td>
                <td> <input type="checkbox" ng-model="task.isadd" ng-click="onclickCheckBox(task)""></td>
                <td> <input type="checkbox" ng-model="task.edit" ng-click="onclickCheckBox(task)"></td>
                <td> <input type="checkbox" ng-model="task.isdelete" ng-click="onclickCheckBox(task)"></td>
                <td> <input type="checkbox" ng-model="task.show" ng-click="onclickCheckBox(task)"></td>
                
            </tr>
        </table>

        <div ng-controller="DialogCtrl">
            <jqdialog dialog-name="App" title="'Đạo pháp'"
                      auto-open="false" width="850" height="450"
                      on-open="onOpen" buttons="{'Lưu': onOk, 'Hủy': onCancel, 'Đóng': 'close' }"
                      args-to-scope="true"
                      before-close="beforeClose">                
                <form class="form-horizontal">
                    <fieldset>
                        <div class="control-group">
							  <label class="control-label" for="user_name">Tài Khoản : </label>
							  <div class="controls">
								<input id="user_name" ng-model="obj.user_name"/>				
							  </div>
						</div>
                        
                        <div class="control-group">
							  <label class="control-label" for="pass_word">Mật Khẩu : </label>
							  <div class="controls">
								<input id="pass_word" ng-model="obj.pass_word"/>				
							  </div>
						</div>
                        <div class="control-group">
							  <label class="control-label" for="email">Email : </label>
							  <div class="controls">
								<input id="email" ng-model="obj.email"/>				
							  </div>
						</div>

                        <div class="control-group">
							  <label class="control-label" for="phone">Điện thoại : </label>
							  <div class="controls">
								<input id="phone" ng-model="obj.phone"/>				
							  </div>
						</div>
                          <div class="control-group">
                                  <label class="control-label" for="selectError">Nhóm</label>
                                  <div class="controls">
                                        <select ng-model="obj.type_id" id="type_id" >
                                            <option ng-repeat="item in gusers" value="{{item.id}}">{{item.group_name}}</option>
                                        </select>
                                  </div>
                          </div>
                    </fieldset>
                </form>                
            </jqdialog>
        </div>
 </div>

<script src="~/Content/lib/jquery-1.8.3.js"></script> 
<script src="~/Content/lib/jquery-ui.js"></script>
<script src="~/Content/lib/angular.js"></script>
<script src="~/Content/lib/module.js"></script>
<script src="~/Content/js/jqdialog/jqdialog.js"></script>
<script src="~/Content/md/pq/pq.js"></script>
<script>
    $("#dscv").html("Phân Quyền Người Dùng");
</script>
